package com.link2room.optimus.dto.result.base;

import com.link2room.common.annotation.L2RTimeString;
import com.link2room.common.util.DateUtil;

import java.sql.Time;

/**
 * Created by sss on 2016/9/1.
 */
public class L2RRateplanDto extends BaseRateplanDto {
    /**
     * 价格计划代码
     */
    private String rpCode;
    /**
     * 价格计划名字
     */
    private String rpName;
    /**
     * 发布渠道
     */
    private String pbChannel;
    /**
     * 发布渠道
     */
    private String pbChannelDes;
    /**
     * 早餐份数
     */
    private Integer breakfast;
    /**
     * 描述
     */
    private String descript;
    /**
     * 最小提前小时数
     */
    private Integer minAdvHours;
    /**
     * 最大提前小时数
     */
    private Integer maxAdvHours;
    /**
     * 最小连住天数
     */
    private Integer minDays;
    /**
     * 最大连住天数
     */
    private Integer maxDays;
    /**
     * 最大可预订房间数
     */
    private Integer maxRmnum;
    /**
     * 每日开售时间
     */
    private Time startTime;
    /**
     * 每日停售时间
     */
    private Time endTime;
    /**
     * 每日开售时间
     */
    @L2RTimeString(source = "startTime")
    private String startTimes;
    /**
     * 每日停售时间
     */
    @L2RTimeString(source = "endTime")
    private String endTimes;
    /**
     * 可支付时间
     */
    private Integer payTime;
    /**
     * 显示支付时间
     */
    private Integer showPayTime;
    /**
     * 备注
     */
    private String remark;
    /**
     * 结账提醒
     */
    private String comsg;
    /**
     * 用券规则：NONE不能用券/ONE一张券/MORE多张券
     */
    private String couponRule;
    private String pointRule;

    private String cancelType;

     /**
     * 自定义取消规则
     */
    private String cancelRule;

    private L2RCancelRuleDto l2rCancelRuleDto;

    public String getRpCode() {
        return rpCode;
    }

    public void setRpCode(String rpCode) {
        this.rpCode = rpCode;
    }

    public String getRpName() {
        return rpName;
    }

    public void setRpName(String rpName) {
        this.rpName = rpName;
    }

    public String getPbChannel() {
        return pbChannel;
    }

    public void setPbChannel(String pbChannel) {
        this.pbChannel = pbChannel;
    }

    public Integer getBreakfast() {
        return breakfast;
    }

    public void setBreakfast(Integer breakfast) {
        this.breakfast = breakfast;
    }

    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }

    public Integer getMinAdvHours() {
        return minAdvHours;
    }

    public void setMinAdvHours(Integer minAdvHours) {
        this.minAdvHours = minAdvHours;
    }

    public Integer getMaxAdvHours() {
        return maxAdvHours;
    }

    public void setMaxAdvHours(Integer maxAdvHours) {
        this.maxAdvHours = maxAdvHours;
    }

    public Integer getMinDays() {
        return minDays;
    }

    public void setMinDays(Integer minDays) {
        this.minDays = minDays;
    }

    public Integer getMaxDays() {
        return maxDays;
    }

    public void setMaxDays(Integer maxDays) {
        this.maxDays = maxDays;
    }

    public Integer getMaxRmnum() {
        return maxRmnum;
    }

    public void setMaxRmnum(Integer maxRmnum) {
        this.maxRmnum = maxRmnum;
    }

    public void setStartTime(Time startTime) {
        this.startTime = startTime;
    }

    public void setEndTime(Time endTime) {
        this.endTime = endTime;
    }

    public String getPbChannelDes() {
        return pbChannelDes;
    }

    public void setPbChannelDes(String pbChannelDes) {
        this.pbChannelDes = pbChannelDes;
    }

    public Integer getPayTime() {
        return payTime;
    }

    public void setPayTime(Integer payTime) {
        this.payTime = payTime;
        if(payTime!=null){
            setShowPayTime(payTime-5);
        }
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getComsg() {
        return comsg;
    }

    public void setComsg(String comsg) {
        this.comsg = comsg;
    }

    public Time getStartTime() {
        return startTime;
    }

    public Time getEndTime() {
        return endTime;
    }

    public String getStartTimes() {
        return startTimes;
    }

    public void setStartTimes(String startTimes) {
        this.startTimes = startTimes;
        setStartTime(new Time(DateUtil.parseTime(startTimes).getTime()));
    }

    public String getEndTimes() {
        return endTimes;
    }

    public void setEndTimes(String endTimes) {
        this.endTimes = endTimes;
        setEndTime(new Time(DateUtil.parseTime(endTimes).getTime()));
    }

    public String getCouponRule() {
        return couponRule;
    }

    public void setCouponRule(String couponRule) {
        this.couponRule = couponRule;
    }

    public String getPointRule() {
        return pointRule;
    }

    public void setPointRule(String pointRule) {
        this.pointRule = pointRule;
    }

    public Integer getShowPayTime() {
        return showPayTime;
    }

    public void setShowPayTime(Integer showPayTime) {
        this.showPayTime = showPayTime;
    }

    public String getCancelType() {
        return cancelType;
    }

    public void setCancelType(String cancelType) {
        this.cancelType = cancelType;
    }

    public L2RCancelRuleDto getL2rCancelRuleDto() {
        return l2rCancelRuleDto;
    }

    public void setL2rCancelRuleDto(L2RCancelRuleDto l2rCancelRuleDto) {
        this.l2rCancelRuleDto = l2rCancelRuleDto;
    }

    public String getCancelRule() {
        return cancelRule;
    }

    public void setCancelRule(String cancelRule) {
        this.cancelRule = cancelRule;
    }
}
